import logging

from google.appengine.ext import db


_log = logging.getLogger(__name__)


class Video(db.Model):
    created = db.DateTimeProperty(auto_now_add=True, required=True)
    modified = db.DateTimeProperty(auto_now=True, required=True)
    question = db.StringProperty(required=True, indexed=False)
    youtube_url = db.LinkProperty(required=True, indexed=False)


class Link(db.Model):
    created = db.DateTimeProperty(auto_now_add=True, required=True)
    modified = db.DateTimeProperty(auto_now=True, required=True)
    title = db.StringProperty(required=True, indexed=False)
    description = db.StringProperty(required=True, indexed=False)
    url = db.LinkProperty(required=True, indexed=False)


class Message(db.Model):
    created = db.DateTimeProperty(auto_now_add=True, required=True)
    modified = db.DateTimeProperty(auto_now=True, required=True)
    sender = db.StringProperty(required=True, indexed=False, default='Visitor')
    body = db.StringProperty(required=True, indexed=False)
